@echo off
setlocal

set "prefix=[examples_init.bat]$"

set "examples_list=game-gui"
set "valid_example=false"

echo [examples_init.bat]$ Please enter an example name, from [%examples_list%]:
set /p example="%prefix% "

for %%i in (%examples_list%) do (
    if "%%i"=="%example%" (
        set "valid_example=true"
        if "%%i"=="game-gui" (
            echo %prefix% call scripts\game-gui.bat
            call scripts\game-gui.bat %cd% %%i
        )
    )
)

if "%valid_example%"=="true" (
	if %ERRORLEVEL% equ 0 (
		echo %prefix% Completed!
	) else (
		echo %prefix% Sub-script execution failed!
	)
) else if "%valid_example%"=="false" (
    echo %prefix% Failed, example name invalid!
)

endlocal
pause
